import request from '@/utils/request'

export function save(data) {
  return request({
    url: '/system/tbCompany/save',
    method: 'post',
    data: data
  })
}

export function saveCommon(data) {
  return request({
    url: '/system/tbCompany/saveCommon',
    method: 'post',
    data: data
  })
}


export function update(data) {
  return request({
    url: '/system/tbCompany/update',
    method: 'post',
    data: data
  })
}

// 保护 {id: 1, tableName: ''}
export function protect(data) {
  return request({
    url: '/system/tbCompany/protect',
    method: 'post',
    data: data
  })
}

// 移除保护 {id: 1, tableName: '', removeNote}
export function removeProtect(data) {
  return request({
    url: '/system/tbCompany/removeProtect',
    method: 'post',
    data: data
  })
}


export function info(data) {
  return request({
    url: '/system/tbCompany/info',
    method: 'get',
    params: data
  })
}
// {} {tableId: tableId}
export function list(data, params) {
  return request({
    url: '/system/tbCompany/list',
    method: 'post',
    data: data,
    params: params
  })
}

export function listAll(data, params) {
  return request({
    url: '/system/tbCompany/listAll',
    method: 'post',
    data: data,
    params: params
  })
}

// 保护列表
export function selectProtected(data, params) {
  return request({
    url: '/system/tbCompany/selectProtected',
    method: 'post',
    data: data,
    params: params
  })
}


export function deletes(data, params) {
  return request({
    url: '/system/tbCompany/delete',
    method: 'post',
    data: data,
    params: params
  })
}

